<% cache "activity-profile-pic-#{activity['actor'].id}-#{activity['actor'].profile_image_url}" do %>
  <a href="<%= activity['actor'].path %>" class="small-pic-link-wrapper">
    <div class="small-pic">
      <img src="<%= ProfileImage.new(activity['actor']).get %>" alt="<%= activity['actor'].username %> profile image">
    </div>
  </a>
<% end %>
<div class="content notification-content article-content">
  <% cache "activity-published-article-#{activity['object'].id}-#{activity['object'].updated_at}" do %>
    <a href="<%= activity['actor'].path %>">
      <%= activity['actor'].name %>
    </a>
    made a new post:
    <a href="<%= activity['object'].path %>">
      <div class="notification-new-post">
        <div class="notification-new-post-title">
          <%= activity['object'].title %>
        </div>
        <div class="notification-new-post-tags">
          <% activity['object'].decorate.cached_tag_list_array.each do |tag| %>
            #<%= tag %>
          <% end %>
        </div>

      </div>
    </a>
  <% end %>
  <% cache "activity-published-article-reactions-#{@last_user_reaction}-#{activity['object'].updated_at}-#{activity['object'].id}" do %>
    <div class="comment-actions">
      <button class="reaction-button <%= Reaction.cached_any_reactions_for?(activity['object'], current_user, "like") ? "reacted" : "" %>" data-reactable-id="<%=activity['object'].id%>" data-category="like" data-reactable-type="Article">
        <%= image_tag "favorite-heart-outline-button.svg" %>
        <img class="reacted-emoji" src="<%= asset_path("emoji/emoji-one-heart.png") %>"/>
      </button>
      <button class="reaction-button readinglist-button <%= Reaction.cached_any_reactions_for?(activity['object'], current_user, "readinglist") ? "reacted" : "" %>" data-reactable-id="<%=activity['object'].id%>" data-category="readinglist" data-reactable-type="Article">
        <span class="reaction-button-text">SAVE</span>
        <img class="reacted-emoji reaction-button-reacted-emoji" src="<%= asset_path("readinglist-button.png") %>"/>
      </button>
    </div>
  <% end %>
</div>
